b28f9f246e483106accc43f525f3f1dcdb11dc14,javolution/core-java/src/main/java/javolution/util/internal/collection/ParallelCollectionImpl.java,ParallelCollectionImpl,removeIf,#Predicate#,186
Before Change
RemoveIfRunnable<E>[] runnables;
ConcurrentContext ctx = ConcurrentContext.enter();
try {
int concurrency = ctx.getConcurrency();
FastIterator<E> itr = iterator();
final FastIterator<E>[] subIterators = itr
.split((FastIterator<E>[]) new FastIterator[concurrency + 1]);
runnables = new RemoveIfRunnable[concurrency + 1];
for (int i = 0; i < runnables.length; i++) {
runnables[i] = new RemoveIfRunnable<E>(filter, subIterators[i]);
if (i < concurrency)
ctx.execute(runnables[i]);
else
After Change
FastTable<RemoveIfRunnable<E>> runnables = FastTable.newTable();
ConcurrentContext ctx = ConcurrentContext.enter();
try {
int n = ctx.getConcurrency() + 1;
@SuppressWarnings("unchecked")
FastCollection<E>[] subViews = new FastCollection[n];
inner.subViews(subViews);
for (FastCollection<E> subView : subViews) {
if (subView == null) continue;
RemoveIfRunnable<E> r = new RemoveIfRunnable<E>(filter, subView.iterator());
ctx.execute(r);
runnables.add(r);
}